package com.git_taoxian.test4;

import java.io.FileReader;
import java.io.IOException;
import java.io.Reader;

public class Test {
    public static void main(String[] args) {
        try (//        定义一个字符输入流对象
             Reader fr = new FileReader("d:/WorkDate/linshidata/tx.txt");){
            int len;
            while((len= fr.read())!=-1){
                System.out.print((char)len);
            }
        } catch (IOException e) {
            e.printStackTrace();
        } finally {
        }
    }
}
